window.onload = function () {
    let parent1 = document.getElementsByClassName('ico-list')[0];
    var icon = data.topCollections[0].icons;
    for (let i = 0; i < icon.length; i++) {  
        var div = document.createElement("div");
        var html = icon[i].show_svg;
        div.innerHTML = html;
        parent1.appendChild(div);
    }
    parent1.style.cssText = 'display: grid; grid-template-columns: repeat(5, 1fr);';

    
    let parent2 = document.getElementsByClassName('ico-list')[1];
    var icon = data.topCollections[1].icons;
    for (let i = 0; i < icon.length; i++) {
        var div = document.createElement("div");
        var html = icon[i].show_svg;
        div.innerHTML = html;
        parent2.appendChild(div);
    }
    parent2.style.cssText = 'display: grid; grid-template-columns: repeat(5, 1fr);';
    

    let parent3 = document.getElementsByClassName('ico-list')[2];
    var icon = data.topCollections[2].icons;
    for (let i = 0; i < icon.length; i++) {
        var div = document.createElement("div");
        var html = icon[i].show_svg;
        div.innerHTML = html;
        parent3.appendChild(div);
    }
    parent3.style.cssText = 'display: grid; grid-template-columns: repeat(5, 1fr);';


    let parent4 = document.getElementsByClassName('ico-list')[3];
    var icon = data.bottomCollections[0].icons;
    for (let i = 0; i < icon.length; i++) {
        var img = document.createElement("img");
        img.src=icon[i].file;
        parent4.appendChild(img);
    }
    parent4.style.cssText = 'width:100%; display: grid; grid-template-columns: repeat(3, 1fr);';

    let parent5 = document.getElementsByClassName('ico-list')[4];
    var icon = data.bottomCollections[1].icons;
    for (let i = 0; i < icon.length; i++) {
        var img = document.createElement("img");
        img.src=icon[i].file;
        parent5.appendChild(img);
    }
    parent5.style.cssText = 'width:100%; display: grid; grid-template-columns: repeat(3, 1fr);';

    let parent6 = document.getElementsByClassName('ico-list')[5];
    var icon = data.bottomCollections[2].icons;
    for (let i = 0; i < icon.length; i++) {
        var img = document.createElement("img");
        img.src=icon[i].file;
        parent6.appendChild(img);
    }
    parent6.style.cssText = 'width:100%; display: grid; grid-template-columns: repeat(3, 1fr);';
    
}